<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        
    </body>
    <script>
        // es5
        function shouji (){

        }
        shouji.name = "苹果";
        shouji.change = function(){
            console.log("我有ios系统")
        }
        shouji.prototype.size = '5.5inch';
        let ios = new shouji();
        console.log(ios.name);  // undefined
        console.log(ios.size);  // 5.5inch



        
        //ES6 明确规定，Class 内部只有静态方法，没有静态属性。现在有一个提案提供了类的静态属性，写法是在实例属性的前面，加上static关键字。
        class Phone{
            // 静态属性
            static name = "手机";
            static change(){
                console.log("我可以改变世界");
            }
        }
        let nokia = new Phone();
        console.log(nokia.name);    // undefined
        console.log(Phone.name);    // 手机
    </script>
</html>